import Vue from "vue";
import Vuex from "vuex";
import goods from "@/store/goods";
import cart from "@/store/cart";
import admin from "@/store/admin";
Vue.use(Vuex);

const store = new Vuex.Store({
	state:{
		b:20
	},
	getters:{
		run(){
			return 100;
		}
	},
	// 划分模块
	modules:{
		// 每一个属性即是一个模块，属性名即是模块的名字
		goods,
		// 购物车模块
		cart,
		admin
	}

});
export default store;